package com.shg.web.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import com.shg.service.TypeSearchService;

@Controller
public class TypeSearchAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String message;
	
	@Resource TypeSearchService typeSearchService;
	/**
	 * 初始化类型搜索
	 * @return
	 */
	public String initApp(){
		try {
			typeSearchService.addSearch();
		} catch (Exception e) {
			e.printStackTrace();
			this.message="初始化类型搜索失败";
			return ERROR;
		}
		this.message="初始化类型搜索成功";
		return "initApp";
	}
	
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
}
